package com.xr;

import com.xr.controller.HelloController;

import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ImportResource;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@SpringBootApplication//对主启动类进行初始化并启动
public class SpringBoot0102Application {


    public static void main(String[] args) {

        //string容器
        ApplicationContext context = SpringApplication.run(SpringBoot0102Application.class, args);
        HelloController bean = context.getBean(HelloController.class);
        System.out.println(bean);

    }


}
